/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : localhost:3306
 Source Schema         : content_center

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 11/12/2021 00:07:33
*/

SET NAMES utf8mb4;
SET
    FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for mid_user_share
-- ----------------------------
DROP TABLE IF EXISTS `mid_user_share`;
CREATE TABLE `mid_user_share`
(
    `id`       int(11) NOT NULL AUTO_INCREMENT,
    `share_id` int(11) NOT NULL COMMENT 'share.id',
    `user_id`  int(11) NOT NULL COMMENT 'user.id',
    PRIMARY KEY (`id`),
    KEY `fk_mid_user_share_share1_idx` (`share_id`),
    KEY `fk_mid_user_share_user1_idx` (`user_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_unicode_ci COMMENT ='用户-分享中间表【描述用户购买的分享】';

-- ----------------------------
-- Table structure for notice
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice`
(
    `id`          int(11)                                 NOT NULL AUTO_INCREMENT COMMENT 'id',
    `content`     varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '内容',
    `show_flag`   tinyint(1)                              NOT NULL DEFAULT '0' COMMENT '是否显示 0:否 1:是',
    `create_time` datetime                                NOT NULL COMMENT '创建时间',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_unicode_ci;


-- ----------------------------
-- Table structure for rocketmq_transaction_log
-- ----------------------------

DROP TABLE IF EXISTS `rocketmq_transaction_log`;
create table rocketmq_transaction_log
(
    id             int auto_increment comment 'id' primary key,
    transaction_id varchar(45) not null comment '事务id',
    log            varchar(45) not null comment '日志'
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_unicode_ci
    comment 'RocketMQ事务日志表';

-- ----------------------------
-- Table structure for share
-- ----------------------------
DROP TABLE IF EXISTS `share`;
CREATE TABLE `share`
(
    `id`           int(11)                                 NOT NULL AUTO_INCREMENT COMMENT 'id',
    `user_id`      int(11)                                 NOT NULL DEFAULT '0' COMMENT '发布人id',
    `title`        varchar(80) COLLATE utf8mb4_unicode_ci  NOT NULL DEFAULT '' COMMENT '标题',
    `create_time`  datetime                                NOT NULL COMMENT '创建时间',
    `update_time`  datetime                                NOT NULL COMMENT '修改时间',
    `is_original`  tinyint(1)                              NOT NULL DEFAULT '0' COMMENT '是否原创 0:否 1:是',
    `author`       varchar(45) COLLATE utf8mb4_unicode_ci  NOT NULL DEFAULT '' COMMENT '作者',
    `cover`        varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '封面',
    `summary`      varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '概要信息',
    `price`        int(11)                                 NOT NULL DEFAULT '0' COMMENT '价格（需要的积分）',
    `download_url` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '下载地址',
    `buy_count`    int(11)                                 NOT NULL DEFAULT '0' COMMENT '下载数 ',
    `show_flag`    tinyint(1)                              NOT NULL DEFAULT '0' COMMENT '是否显示 0:否 1:是',
    `audit_status` varchar(10) COLLATE utf8mb4_unicode_ci  NOT NULL DEFAULT '0' COMMENT '审核状态 NOT_YET: 待审核 PASSED:审核通过 REJECTED:审核不通过',
    `reason`       varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '审核不通过原因',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 2
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_unicode_ci COMMENT ='分享表';

-- ----------------------------
-- Records of share
-- ----------------------------
BEGIN;
INSERT INTO `share`
VALUES (1, 1, 'spring', '2021-05-05 22:57:01', '2021-05-05 22:57:04', 1, 'xx', 'xxx', 'xxx', 0, 'xx', 1, 1, '0', '');
COMMIT;

SET
    FOREIGN_KEY_CHECKS = 1;
